import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:provider/provider.dart';
import 'package:router/annotation.dart';

import 'provider/after_sale_list_provider.dart';
import 'widget/after_sale_browser.dart';

@RouterConfig(AfterSaleListPage.pageName)
class AfterSaleListPage extends StatefulWidget {
  static const pageName = '/afterSaleListPage';

  @override
  _AfterSaleListPageState createState() => _AfterSaleListPageState('售后记录');
}

class _AfterSaleListPageState extends BaseState<AfterSaleListPage> {
  _AfterSaleListPageState(String pageName) : super(pageName);

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider(
      create: (ctx) => AfterSaleListProvider(),
      child: Scaffold(
        appBar: CenterTitleAppBar(
          title: '售后记录',
        ),
        body: AfterSaleBrowser(),
      ),
    );
  }
}
